<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
    <title>一珏文创</title>
    <style>
        html,body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100%;
        }
        .main {
            width: 100%;
            height: 100%;
        }
        .left-bg {
            position: absolute;
            left: 0;
            right: 50%;
            top: 0;
            bottom: 0;
            background-color: #C9151E;
            box-shadow: 5px 2px 6px #505050;
            z-index: 100;
            border-right: 1px solid #624A40;
        }
        .right-bg {
            position: absolute;
            left: 50%;
            right: 0;
            top: 0;
            bottom: 0;
            background-color: #EEEEED;
        }
        .index-logo {
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 1000;
            text-align: center;
        }
        .index-logo > img {
            position: absolute;
            width: 78%;
            top: 50%;
            left: 50%;
            transform: translateX(-50%)  translateY(-50%);
        }
        .index-title {
            position: absolute;
            z-index: 1000;
            top: 10%;
            left: 12%;
        }
        .index-footer {
            position: absolute;
            z-index: 1000;
            bottom: 4%;
            right: 90px;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="left-bg"></div>
        <div class="right-bg"></div>
        <div class="index-logo">
            <img src="static/index-logo.png" >
        </div>
        <div class="index-title">
            <img src="static/index-title.png">
        </div>
        <div class="index-footer">
            <img src="static/index-footer.png">
        </div>
    </div>
    <script src="https://cdn.bootcss.com/jquery/2.2.2/jquery.min.js"></script>
    <script>
        $("body").on("touchstart", function(e) {
            e.preventDefault();
            startX = e.originalEvent.changedTouches[0].pageX,
                startY = e.originalEvent.changedTouches[0].pageY;
        });
        $("body").on("touchmove", function(e) {
            e.preventDefault();
            moveEndX = e.originalEvent.changedTouches[0].pageX,
                moveEndY = e.originalEvent.changedTouches[0].pageY,
                X = moveEndX - startX,
                Y = moveEndY - startY;

            if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
                // alert("left 2 right");
            }
            else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
                // alert("right 2 left");
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
                // alert("top 2 bottom");
            }
            else if ( Math.abs(Y) > Math.abs(X) + 20 && Y < 0 ) {
                window.location.href="menu.html"
            }
            else{
                // alert("just touch");
            }
        });
    </script>
</body>
</html>